package en.kaist.cs408.acav;

import android.app.Activity;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.animation.Animation;
import android.view.animation.TranslateAnimation;
import android.widget.ImageView;
import en.kaist.cs408.R;

public class Main extends Activity implements OnClickListener {
	int c;
	ImageView img;
	
	//View creation which displays the launching application image
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
       
        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
        
        findViewById(R.id.lay).setOnClickListener(this);
        Animation animation=new TranslateAnimation(0, 0, 320, 0);
        animation.setDuration(1000);
        img = (ImageView) findViewById(R.id.img_logo);
        img.setAnimation(animation);
    }
    
    //When the image is clicked, another view is loaded
    public void onClick(View v) {
		switch (v.getId()) {
		case R.id.lay:
			Intent intent = new Intent(Main.this,Home.class);
			startActivity(intent);
			break;
		}
	}
}


